/*
 * @Description: 全局loading
 * @Author: ZY
 * @Date: 2021-01-20 15:02:11
 * @LastEditors: dh
 * @LastEditTime: 2022-01-25 15:38:50
 */

import { ElLoading } from 'element-plus';

export default function () {
	const loading = (title: string) => {
		const loadingInstance = ElLoading.service({ text: title });
		return loadingInstance;
	};

	return {
		loading,
	};
}
